package com.kinyx.springframework.boot.autoconfigure.orm.jpa;

import java.util.Map;

import org.springframework.boot.autoconfigure.orm.jpa.HibernatePropertiesCustomizer;
import org.springframework.stereotype.Component;

import com.kinyx.hibernate.boot.MetadataBuilderContributorImpl4BitSetBasicType;

@Component
public class HibernatePropertiesCustomizerImpl4BitSetBasicType implements HibernatePropertiesCustomizer {

	@Override
	public void customize(final Map<String, Object> properties) {
		// 坑爹的Hibernate在org.hibernate.cfg.AvailableSettings中居然没有声明该值。
		// 还是文档最靠谱
		properties.put("hibernate.metadata_builder_contributor", MetadataBuilderContributorImpl4BitSetBasicType.class.getName());
	}

}
